﻿Imports System.Data.SqlClient
Public Class FrmXemDS_HoaDon
    Dim cnStr As String = "Data Source=.\SQLEXPRESS;Initial Catalog=QLKS;Integrated Security=True"
    Dim con As New SqlConnection(cnStr)

    Private Sub FrmXemDS_HoaDon_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim sql As String = "select * from HoaDon"
        Dim bs As New BindingSource()
        Dim da As New SqlDataAdapter(sql, con)
        Dim dt As New DataTable()
        da.Fill(dt)
        bs.DataSource = dt
        DataGridView1.DataSource = bs
    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
        Me.Close()
    End Sub
End Class